import { createRouter, createWebHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        name:'Main',
        redirect:'login',
        component: () => import('../views/Main.vue'),
        children: [
            {
                path:'/login',
                name:'login',
                component:()=>import('../views/login/login.vue')
            },
            {
                path: '/news',
                name: 'news',
                component: () => import('../views/news/News.vue')
            },
            {
                path: '/progress',
                name: 'progress',
                component: () => import('../views/progress/Progress.vue')
            },
            // {
            //     path: '/delivery',
            //     name: 'delivery',
            //     component: () => import('../views/delivery/Delivery.vue')
            // },
            // {
            //     path: '/portal',
            //     name: 'portal',
            //     component: () => import('../views/portal/Portal.vue')
            // },
            {
                path: '/log',
                name: 'log',
                component: () => import('../views/log/Log.vue')
            },
            {
                path: '/settings',
                name: 'settings',
                component: () => import('../views/settings/Settings.vue')
            },
            {
                path: '/device',
                name: 'device',
                component: () => import('../views/device/Device.vue')
            },
        ]
    }
]
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router